{% load widget_tweaks %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    {% load static %}
    <!-- Icons -->
    <link href="{% static 'dashboard/font-awesome.min.css' %}" type="text/css" rel="stylesheet">
    <link href="{% static 'dashboard/simple-line-icons.css' %}" type="text/css" rel="stylesheet">
    <link href="{% static 'dashboard/style.css' %}" type="text/css" rel="stylesheet">
    <script src="{% static 'dashboard/jquery.min.js' %}" type="text/javascript"></script>
    <script src="{% static 'dashboard/popper.min.js' %}" type="text/javascript"></script>
    <script src="{% static 'dashboard/bootstrap.min.js' %}" type="text/javascript"></script>
    <script src="{% static 'dashboard/pace.min.js' %}" type="text/javascript"></script>

    <!-- CoreUI main scripts -->
    <script src="{% static 'dashboard/app.js' %}"></script>

    <!-- Plugins and scripts required by all views -->
    <script src="{% static 'dashboard/Chart.min.js' %}" type="text/javascript"></script>


    <title>{% block title %}Dashboard{% endblock %}</title>
</head>

<body class="app flex-row align-items-center">
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card-group">
                <div class="card p-4">
                    <div class="card-body">
                        <h1>Login</h1>
                        <p class="text-muted">Sign In to your account</p>
                        {% if next_url %}
                            <form METHOD="POST" action="{% url 'dashboard:user_login' %}?next={{ next_url }}">
                        {% else %}
                        <form METHOD="POST" action="{% url 'dashboard:user_login' %}">
                        {% endif %}
                            {% csrf_token %}

                            <div class="input-group mb-3">
                                <span class="input-group-addon"><i class="icon-user"></i></span>
                                {% render_field login_form.username class="form-control" placeholder="Username" %}
                            </div>
                            <div class="input-group mb-4">
                                <span class="input-group-addon"><i class="icon-lock"></i></span>
                                {% render_field login_form.password class="form-control" placeholder="Password" %}
                            </div>

                            {% for error in login_form.non_field_errors %}
                                <p class="font-weight-bold text-danger">{{ error }}</p>
                            {% endfor %}

                            <div class="text-center">
                                <button type="submit" class="center-block btn btn-primary px-4">Login</button>
                            </div>

                            {% comment %}
                            <div class="row">
                                <div class="col-6">
                                    <button type="submit" class="btn btn-primary px-4">Login</button>
                                </div>

                                <div class="col-6 text-right">
                                    <button type="button" class="btn btn-link px-0">Forgot password?</button>
                                </div>
                                </div>
                            {% endcomment %}
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


</body>
</html>